package shop.services.front.offline.dao.impl;

import org.springframework.stereotype.Repository;
import shop.core.common.dao.BaseDao;
import shop.core.common.dao.page.PagerModel;
import shop.services.front.offline.bean.Offline;
import shop.services.front.offline.dao.OfflineDao;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2017/4/21.
 */
@Repository("offlineDaoFront")
public class OfflineDaoImpl implements OfflineDao {
    @Resource
    private BaseDao dao;
    public void setDao(BaseDao dao) {
        this.dao = dao;
    }

    @Override
    public int insert(Offline offline) {return 0;}

    @Override
    public int delete(Offline offline) {
        return 0;
    }

    @Override
    public int update(Offline offline) {
        return dao.update("front.offline.update",offline);
    }

    @Override
    public Offline selectOne(Offline offline) {
        return (Offline) dao.selectOne("front.offline.selectOne", offline);
    }

    @Override
    public PagerModel selectPageList(Offline offline) {
        return dao.selectPageList("front.offline.selectPageList",
                "front.offline.selectPageCount", offline);
    }

    @Override
    public List<Offline> selectList(Offline offline) {
        return dao.selectList("front.offline.selectList", offline);
    }

    @Override
    public int deleteById(int id) {
        return 0;
    }

    @Override
    public Offline selectById(String id) {
        return null;
    }
}
